<template>
  <div>
    <dlqmap v-if="activeName2 == 'first'"></dlqmap>
    <overview v-if="run" :run="run"></overview>

    <div class="a1" :style="{ top: 70 + 'px', left: offsetwidth - 100 + 'px' }">
      <el-radio-group v-model="activeName2" size="small" fill="#4BACC6">
        <el-radio-button label="first">地图</el-radio-button>
        <el-radio-button label="second">概览</el-radio-button>
      </el-radio-group>
    </div>
  </div>
</template>

<script>
import dlqmap from "../map/index1";
import overview from "../overview/index";

export default {
  name: "dashboard",

  data() {
    return {
      activeName2: "first",
      offsetwidth: document.documentElement.clientWidth - 230,
      run: false,
      // offsetheight : document.documentElement.clientHeight - 150,
    };
  },

  props: {},

  components: {
    dlqmap,
    overview,
  },

  computed: {},

  methods: {},

  watch: {
    activeName2(ret) {
      if (ret === "second") {
        this.run = true;
      } else {
        this.run = false;
      }
    },
  },

  mounted() {},
};
</script>

<style scoped>
.a1 {
  position: absolute;
  z-index: 9999;
}
</style>
